/**
 * jquery.isPlainObject方法的测试 测试参数对象是否是纯粹的对象（通过“{}”或者“new Object”创建的）
 */
function isPlainObject(obj) {
	var hasOwn = Object.prototype.hasOwnProperty;
	// Must be an Object.
	// Because of IE, we also have to check the presence of the constructor
	// property.
	// Make sure that DOM nodes and window objects don't pass through, as well
	if (!obj || jQuery.type(obj) !== "object" || obj.nodeType
			|| jQuery.isWindow(obj)) {
		return false;
	}

	// Not own constructor property must be Object
	if (obj.constructor && !hasOwn.call(obj, "constructor")
			&& !hasOwn.call(obj.constructor.prototype, "isPrototypeOf")) {
		return false;
	}

	// Own properties are enumerated firstly, so to speed up,
	// if last one is own, then all properties are own.

	var key;
	for (key in obj) {
	}

	return key === undefined || hasOwn.call(obj, key);
}
log(isPlainObject({}));
var func={};
log(isPlainObject(func));
log(isPlainObject("log);"));